package cn.sc.summer.adapter.controller;

import cn.sc.summer.constant.model.Result;
import cn.sc.summer.domain.service.SysTenantInfoService;
import cn.sc.summer.protocol.form.SysTenantInfoForm;
import cn.sc.summer.protocol.vo.TenantInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 类名：区域信息管理
 *
 * @author a-xin
 * @date 2023/9/8 14:10
 */
@Slf4j
@RestController
@RequestMapping("/tenant")
@Api(tags = "tenant-区域信息管理")
public class SysTenantInfoController {

    @Resource
    private SysTenantInfoService sysTenantInfoService;

    @PostMapping("/addTenant")
    @ApiOperation(value = "新增区域信息")
    public Result<TenantInfoVO> addTenant(@Validated @RequestBody SysTenantInfoForm form) {
        return Result.success(sysTenantInfoService.addTenant(form));
    }


}
